

#ifndef AdvancedChangeDetectionCONTROLARCHITECTURE_H
#define AdvancedChangeDetectionCONTROLARCHITECTURE_H

#include "RoboroboMain/common.h"
#include "RoboroboMain/roborobo.h"

//#include "newscast/PopulationControlArchitecture.h" //ENABLE FOR HYBRID
#include "ClusterBasedMPOControlArchitecture.h" //ENABLE FOR MU+1
#include "multikulti/MultiKultiInstance.h"

#include "WorldModels/RobotAgentWorldModel.h"

class AdvancedChangeDetectionControlArchitecture : public ClusterBasedMPOControlArchitecture {
public:
	//Initializes the variables
	AdvancedChangeDetectionControlArchitecture(RobotAgentWorldModel *__wm);
	virtual ~AdvancedChangeDetectionControlArchitecture();

	virtual ControllerPtr createRandomGenome();
	virtual double calculateStepFitness();
	
	static double migrationRate;
	static double eliteSize;
	static double bestRate;
	static int migrationType;
	static int topologyType;
	
private:
	bool isInVector(ControllerPtr cont, vector<ControllerPtr> * theVector);
};


#endif

